﻿using CommunityToolkit.Mvvm.ComponentModel;
using FFmpeg.AutoGen;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ymk_camera_surveillance.Decode;

namespace ymk_camera_surveillance.Config
{
    public class Conf : ObservableObject
    {
        public static readonly Conf Instance = new Conf();

        public const string DatabaseFilename = "my_data_sqlite.db3";

        public const SQLite.SQLiteOpenFlags Flags =
            // open the database in read/write mode
            SQLite.SQLiteOpenFlags.ReadWrite |
            // create the database if it doesn't exist
            SQLite.SQLiteOpenFlags.Create |
            // enable multi-threaded database access
            SQLite.SQLiteOpenFlags.SharedCache;
        public string databasePath = Path.Combine(FileSystem.AppDataDirectory, DatabaseFilename);


        private int id = 0;
        private string ffmpegVersion = "";
        private string ffmpegPath = "";

        private string ffmpegDefaultHWDevice = "";


        public string DatabasePath
        {
            get => databasePath;
            set => SetProperty(ref databasePath, value);
        }

        public int Id
        {
            get => id;
            set => SetProperty(ref id, value);
        }

        public string FFmpegVersion
        {
            get => ffmpegVersion;
            set => SetProperty(ref ffmpegVersion, value);
        }

        public string FFmpegPath
        {
            get => ffmpegPath;
            set => SetProperty(ref ffmpegPath, value);
        }

        public string FFmpegDefaultHWDevice
        {
            get => ffmpegDefaultHWDevice;
            set => SetProperty(ref ffmpegDefaultHWDevice, value);
        }
    }
}